/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package byblos.apresentacao.idioma;

import byblos.negocio.Idioma;
import org.vraptor.annotations.Component;
import org.vraptor.annotations.InterceptedBy;
import org.vraptor.annotations.Logic;
import org.vraptor.annotations.Out;
import org.vraptor.annotations.Parameter;
import org.vraptor.scope.ScopeType;

/**
 *
 * @author Diego
 */
@Component
@InterceptedBy(value = {InterceptadorIdioma.class})
public class IdiomaComponent {

    @Parameter
    private String retorno = "home";
    @Out(scope = ScopeType.SESSION)
    private Idioma idioma;

    @Logic(parameters = "idioma")
    public String alterar(Idioma idioma) {
        this.idioma = idioma;
        return retorno;
    }
}
